package com.yzt.zhuju.widget.viewpager;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.yzt.zhuju.R;
import com.yzt.zhuju.network.entity.message.BannerData;
import com.yzt.plugin_imageloader.ImageLoadUtil;
import com.yzt.plugin_widget.RoundImageView;
import com.zhouwei.mzbanner.holder.MZViewHolder;

/**
 * author : bob
 * date   : 2022/12/2
 * desc   :
 */
public class BannerMessageViewHolder  implements MZViewHolder<BannerData> {

    private RoundImageView mImageView;

    @Override
    public View createView(Context context) {
        // 返回页面布局
        View view = LayoutInflater.from(context).inflate(R.layout.banner_item, null);
        mImageView = view.findViewById(R.id.banner_iv);
        return view;
    }

    @Override
    public void onBind(Context context, int position, BannerData data) {
        ImageLoadUtil.loadIvNoType(context, data.getPic(), mImageView);
    }
}

